#e
#Title[iʏe`Normal]
#Text[qɏȂΊyłB]
#ScriptVersion[2]

script_enemy_main {  
    let imgBoss   = "script\img\ExRumia.png";
    let frame     =  0;
    let angleBase = 90;

    @Initialize {
      
        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(4000);
        SetTimer(47);
       

        LoadGraphic(imgBoss);
        SetTexture(imgBoss);
        SetGraphicRect(0, 0, 63, 63);
    }

    @MainLoop {
        SetCollisionA(GetX, GetY, 24);
        SetCollisionB(GetX, GetY, 24);

        frame++;
        if(frame == 3) {           
            let angle = angleBase - 10;
            loop(2) {
            CreateShot01(GetX, GetY, 2, angleBase , WHITE22, 2);
            CreateShot01(GetX, GetY, 2, angleBase +20, WHITE22, 2);
           
            
            CreateShot01(GetX, GetY, 3, angleBase , WHITE22, 1);
            CreateShot01(GetX, GetY, 3, angleBase +110, WHITE22, 1);
           
            CreateShot01(GetX, GetY, 2, angleBase -180, WHITE22, 2);
            CreateShot01(GetX, GetY, 2, angleBase -200, WHITE22, 2);
        
            CreateShot01(GetX, GetY, 3, angleBase -90, WHITE22, 1);
            CreateShot01(GetX, GetY, 3, angleBase -70, WHITE22, 1); 
            angleBase += 10;
            }
            angleBase += 8;
        } else if(frame == 10) {
            let angle = angleBase - 10;
          loop(1) {
            CreateShot01(GetX, GetY, 2, angle, WHITE03, 2);     
            CreateShot01(GetX, GetY, 2, angleBase +90, WHITE03, 2);      
            CreateShot01(GetX, GetY, 2, angle -90, WHITE03, 2);   
            CreateShot01(GetX, GetY, 2, angle -180, WHITE03, 2);    
            angle += 10;            

            }            
            angleBase += 8;
            frame = 0;
        }
    }

    @DrawLoop {
        DrawGraphic(GetX, GetY);
    }

    @Finalize {
        DeleteGraphic(imgBoss);
    }
}